package com.ruoyi.datastatistics.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class XbDatabase {
    private static final long serialVersionUID = 1L;
    /**
     * 设备ID
     */
    private String tId;

    @TableField(exist = false)
    @Excel(name = "用户名称", type = Excel.Type.EXPORT)
    private String userName;

    /**
     * 用户编号
     */
    @Excel(name = "用户编号")
//    @JsonProperty("UserId")
    @TableField("user_id")
    private String userId;

    @TableField("location_nb")
    private String locationNb;

    /**
     * 设备编号
     */
    @TableField("terminal_id")
    private String terminalId;

    @TableField("imei")
    private String imei;

    /**
     * 厂家编号
     */
    @TableField("supplier_id")
    private String supplierId;

    /**
     * 安装日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("install_date")
    private Date installDate;

    @TableField(exist = false)
//    @Excel(name = "协议名称", type = Excel.Type.EXPORT)
    private String protocolName;

    @TableField(exist = false)
//    @JsonProperty("AreaName")
    private String areaName;

    @TableField(exist = false)
    private Integer loginUserId;

    @TableField(exist = false)
    private Integer systemFlag;

    @TableField(exist = false)
    private String tenantId;

    /**
     * 水表读数
     */
    @Excel(name = "水表读数")
    @TableField("total_flow")
    private BigDecimal totalFlow;

    /**
     * 终端电压
     */
    @Excel(name = "终端电压")
    @TableField("terminal_vol")
    private BigDecimal terminalVol;

    /**
     * 信号强度
     */
    @Excel(name = "信号强度")
    @TableField("terminal_csq")
    private Integer terminalCsq;

    /**
     * 阀门状态
     */
    @Excel(name = "阀门状态", readConverterExp = "0=关,1=开")
    @TableField("valve_state")
    private BigDecimal valveState;

    /**
     * 抄表时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "抄表时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("read_date")
    private Date readDate;
}
